home *** CD-ROM | disk | FTP | other *** search
/ Columbia Kermit / kermit.zip / newsgroups / misc.19990422-19990725 / 000135_news@watsun.cc.columbia.edu _Thu Jun 10 10:25:28 1999.msg < prev    next >
Internet Message Format  |  2020-01-01  |  6KB

  1. Return-Path: <news@watsun.cc.columbia.edu>
  2. Received: from newsmaster.cc.columbia.edu (newsmaster.cc.columbia.edu [128.59.59.30])
  3.     by watsun.cc.columbia.edu (8.8.5/8.8.5) with ESMTP id KAA14738
  4.     for <kermit.misc@watsun.cc.columbia.edu>; Thu, 10 Jun 1999 10:25:28 -0400 (EDT)
  5. Received: (from news@localhost)
  6.     by newsmaster.cc.columbia.edu (8.8.5/8.8.5) id KAA14879
  7.     for kermit.misc@watsun.cc.columbia.edu; Thu, 10 Jun 1999 10:25:22 -0400 (EDT)
  8. X-Authentication-Warning: newsmaster.cc.columbia.edu: news set sender to <news> using -f
  9. From: fdc@watsun.cc.columbia.edu (Frank da Cruz)
  10. Subject: Re: ISO VT320 emulator with key-bindings for Oracle Forms
  11. Date: 10 Jun 1999 14:25:21 GMT
  12. Organization: Columbia University
  13. Message-ID: <7johsh$egs$1@newsmaster.cc.columbia.edu>
  14. To: kermit.misc@watsun.cc.columbia.edu
  15.  
  16. peter@baileynm.com (Peter da Silva) wrote:
  17. : In article <7jjshc$ere$1@newsmaster.cc.columbia.edu>,
  18. : Frank da Cruz <fdc@watsun.cc.columbia.edu> wrote:
  19. : > ...
  20. : > b. Inconsistent among different UNIX platforms and versions (e.g. the
  21. : >    APIs differ -- even a simple function like tputs() has practically
  22. : >    infinite combinations of return type and argument types, thus preventing
  23. : >    any program that uses it from being portable without including hundreds
  24. : >    of #ifdefs);
  25. : I haven't run into this problem, and I've written and ported an awful lot of
  26. : curses-based code between UNIX systems. Some code did a good job of
  27. : encapsulating the slight differences between implemetations of the termlib
  28. : API, and other code made no attempt to hide system dependencies and just
  29. : scattered ifdefs all over the place. Even otherwise well-written code like
  30. : early versions of Kermit had that problem.
  31. tputs() can be void or int.  The third argument of tputs(), which is a pointer
  32. to a function to put a character, can be void, int, or char.  The argument
  33. to that function can be void or char.  Thus there are at least 2 x 3 x 2 = 12
  34. combinations that must be accounted for in any portable code that uses tputs().
  35. Probably more like 30 when you take into account that int or char can be
  36. signed or unsigned.  Of course the ugliness is encapsulated, but that doesn't
  37. make any less ugly.  I have never understood the force impels UNIX
  38. implementors to change data types of widely used APIs every time they get a
  39. chance.
  40.  
  41. : > c. Dependent on buggy and/or incomplete databases;
  42. : That's something the end-user can fix.
  43. If the end-user knows how to.  This is a rather obscure and dying art; one
  44. does not rely on end-users to have mastery of it.  In these times, end-users
  45. expect software to "just work".
  46.  
  47. : > d. Offer only an incomplete and sketchy model of any real terminal,
  48. : >    not even close to sufficient for defining an accurate emulation;
  49. : My vt100 emulator, which used raw termlib, did a better job of vt100
  50. : emulation than most commercial packages.  It didn't try and provide
  51. : perfect visuals: double-wide and double-high letters, for example, were
  52. : simply not addressed. But it passed the vt100 torture test.
  53. Then it didn't run strictly from termcap/terminfo information; otherwise, it
  54. wouldn't have been a vt100 emulator, it would have been an emulator of every
  55. terminal that had an entry in the database, right?  The database only encodes
  56. certain information about a terminal, not all the information needed to make
  57. a fully functional emulator.  Such items as report requests and responses,
  58. forms-filling, and blockmode spring to mind.
  59.  
  60. : > e. Notorious for refusing to work due to library version mismatches;
  61. : > f. Sometimes not available at all.
  62. : That's an easy fix. Same solution as B.
  63. It's easy if you understand cryptic messages about shared libraries, and
  64. are familiar with the politics regarding curses vs ncurses, libc vs glibc,
  65. competing numbering schemes, etc, and what to do about them.
  66.  
  67. : >And that in any case, this does not solve the original problem:
  68. : >
  69. : >  How do I map Shift-Alt-F7 to such-and-such a function?
  70. : >
  71. : >The answer will still be: "you can't, because the software has no way of
  72. : >knowing that you pressed Shift-Alt-F7".
  73. : With a keyboard mapping file that maps escape sequences to symbols that
  74. : the user's interested in.
  75. If xmodmap recognizes your keyboard and can see Shift-Alt-F7 as distinct from
  76. other key combinations, then yes, but only for xterm.  A separate solution is
  77. required for the console.  Remote (non-X) sessions haven't a prayer.
  78.  
  79. You win some and lose some.  UNIX is a general-purpose multiuser operating
  80. system designed originally to be accessed from a terminal, and in fact a
  81. variety of terminals.  The idea of a UNIX workstation with its own keyboard
  82. and screen was grafted on later and is still not a good fit.
  83.  
  84. DOS and Windows, on the other hand, are single-user operating systems designed
  85. to be used ONLY from the built-in keyboard, mouse, and screen, and therefore
  86. include APIs (or direct hardware access) that make terminal emulation possible
  87. in the sense that most people expect.  But this is at the expense of
  88. generalized accessibility.
  89.  
  90. It is hard to explain this to people who expect UNIX to be like Windows.
  91. While it might be possible to write a true terminal emulator for a specific
  92. UNIX variety on specific hardware that runs only in an X window (and in fact
  93. there are numerous examples -- xterm, Xfree86 xterm, the xterm versions from
  94. HP, IBM, and other companies that emulate their own proprietary terminal
  95. types), it is not possible in the general case, due to differences in hardware
  96. (e.g. different keyboards), windowing systems (in the X environment), screen
  97. drivers (in the console environment), APIs, and access methods.
  98.  
  99. - Frank